]> dgit.raspbian.org Git - gnome-shell.git/commit
extensions-app: Only change state if necessary
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 5 Jan 2024 09:52:08 +0000 (10:52 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sun, 7 Jan 2024 10:02:23 +0000 (10:02 +0000)
commite75a2ca146ddad1f586af196009592ee28db476c
treef3b282fdf287c80cb96ab3324c64d848372a6555
parent1c5a10a71f3cec9cd66b7a0a2dc8d3e2799b6fea
extensions-app: Only change state if necessary

The `state-set` signal is emitted to change the underlying state,
which can have two reasons:

 1. the user toggled the switch
 2. the extension's `enabled` state changed externally

In the second case, calling enable/disable is pointless at best,
and can mess up the expected state by permanently disabling an
extension that was disabled because of the global kill switch.

Address this by only calling enable/disable if the new state does
not already match the current value of the `enabled` property.

Close https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7305

Fixes: fec523f83f ("extensions-app: Use new 'enabled' property")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3090>
subprojects/extensions-app/js/extensionRow.js